//
//  XMGTabBarController.m
//  dd
//
//  Created by hanweiguang on 2019/1/26.
//  Copyright © 2019年 hanweiguang. All rights reserved.
//

#import "AppTabBarController.h"

#import "HomeViewController.h"
#import "MineViewController.h"


@interface AppTabBarController ()

@end

@implementation AppTabBarController

- (void)viewDidLoad {

    [super viewDidLoad];
    
    [self setupOneChildViewController:[[HomeViewController alloc]init] title:@"首页" images:@"tabBar_home_icon" slectImage:@"tabBar_home_click_icon"];
    [self setupOneChildViewController:[[MineViewController alloc]init] title:@"个人中心" images:@"tabBar_me_icon" slectImage:@"tabBar_me_click_icon"];
 
    
 }


//添加controller
- (void) setupOneChildViewController:(UIViewController *)vc title:(NSString *) title images:(NSString *) image slectImage:(NSString *) selectImg{
    
    vc.view.backgroundColor = [UIColor whiteColor];
    vc.tabBarItem.title = title;
    vc.tabBarItem.image = [ UIImage imageNamed:image];
    vc.tabBarItem.selectedImage = [UIImage imageNamed:selectImg];
    [self addChildViewController:vc];

    
}

@end
